package main

import (
	"fmt"
	"github.com/julienschmidt/httprouter"
	"net/http"
	_ "openwechat/config"
	"openwechat/handler"
)

func main() {
	//openai, err := gtp.Openai("test_demo", "解密Base64 WW91J3JlIHJlYWxseSBnb29kLiBXaGF0IGZ1bmN0aW9ucyBjYW4geW91IGRv,采用UTF-8编码")
	//if err != nil {
	//	logs.Error(err)
	//	return
	//}
	//logs.Info(openai)

	router := httprouter.New()
	router.GET("/", func(w http.ResponseWriter, r *http.Request, p httprouter.Params) {
		fmt.Fprint(w, "i am ok \n")
	})
	//企业微信
	router.GET("/receiveWechatMsg", handler.WeChatVerifyURL)
	router.POST("/receiveWechatMsg", handler.WxMsgHandler)
	fmt.Println("!!!!!!!!!!!success start!!!!!!!!!!!!")
	http.ListenAndServe(":8000", router)
}
